.class Lcom/waiqin365/base/login/at;
.super Ljava/lang/Object;

# interfaces
.implements Lcom/hyphenate/EMMessageListener;


# instance fields
.field final synthetic a:Lcom/waiqin365/base/login/LoginMainActivity;


# direct methods
.method constructor <init>(Lcom/waiqin365/base/login/LoginMainActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/base/login/at;->a:Lcom/waiqin365/base/login/LoginMainActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onCmdMessageReceived(Ljava/util/List;)V
    .locals 6

    const-string/jumbo v0, "LoginmainIM"

    const-string/jumbo v1, "onCmdMessageReceived"

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    if-eqz p1, :cond_1

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_1

    const/4 v0, 0x0

    move v1, v0

    :goto_0
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    if-ge v1, v0, :cond_1

    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMMessage;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->getBody()Lcom/hyphenate/chat/EMMessageBody;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMCmdMessageBody;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMCmdMessageBody;->action()Ljava/lang/String;

    move-result-object v2

    const-string/jumbo v0, ""

    :try_start_0
    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMMessage;

    const-string/jumbo v3, "groupId"

    invoke-virtual {v0, v3}, Lcom/hyphenate/chat/EMMessage;->getStringAttribute(Ljava/lang/String;)Ljava/lang/String;
    :try_end_0
    .catch Lcom/hyphenate/exceptions/HyphenateException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    :goto_1
    new-instance v3, Landroid/content/Intent;

    const-string/jumbo v4, "com.em.receiver.cmdmessage"

    invoke-direct {v3, v4}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string/jumbo v4, "action"

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v5

    if-eqz v5, :cond_0

    const-string/jumbo v2, ""

    :cond_0
    invoke-virtual {v3, v4, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string/jumbo v2, "groupId"

    invoke-virtual {v3, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    iget-object v2, p0, Lcom/waiqin365/base/login/at;->a:Lcom/waiqin365/base/login/LoginMainActivity;

    invoke-virtual {v2, v3, v0}, Lcom/waiqin365/base/login/LoginMainActivity;->sendBroadcast(Landroid/content/Intent;Ljava/lang/String;)V

    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Lcom/hyphenate/exceptions/HyphenateException;->printStackTrace()V

    const-string/jumbo v0, ""

    goto :goto_1

    :cond_1
    return-void
.end method

.method public onMessageChanged(Lcom/hyphenate/chat/EMMessage;Ljava/lang/Object;)V
    .locals 2

    const-string/jumbo v0, "LoginmainIM"

    const-string/jumbo v1, "onMessageChanged"

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    return-void
.end method

.method public onMessageDeliveryAckReceived(Ljava/util/List;)V
    .locals 2

    const-string/jumbo v0, "LoginmainIM"

    const-string/jumbo v1, "onMessageDeliveryAckReceived"

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    return-void
.end method

.method public onMessageReadAckReceived(Ljava/util/List;)V
    .locals 5

    const-string/jumbo v0, "LoginmainIM"

    const-string/jumbo v1, "onMessageReadAckReceived"

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    if-eqz p1, :cond_2

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_2

    const/4 v0, 0x0

    move v1, v0

    :goto_0
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    if-ge v1, v0, :cond_2

    new-instance v3, Landroid/content/Intent;

    const-string/jumbo v0, "com.em.receiver.ackmessage"

    invoke-direct {v3, v0}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMMessage;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->getFrom()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_1

    const-string/jumbo v0, ""

    move-object v2, v0

    :goto_1
    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMMessage;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->getMsgId()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    if-eqz v4, :cond_0

    const-string/jumbo v0, ""

    :cond_0
    const-string/jumbo v4, "from"

    invoke-virtual {v3, v4, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string/jumbo v2, "msgid"

    invoke-virtual {v3, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    iget-object v0, p0, Lcom/waiqin365/base/login/at;->a:Lcom/waiqin365/base/login/LoginMainActivity;

    const/4 v2, 0x0

    invoke-virtual {v0, v3, v2}, Lcom/waiqin365/base/login/LoginMainActivity;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V

    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_0

    :cond_1
    move-object v2, v0

    goto :goto_1

    :cond_2
    return-void
.end method

.method public onMessageReceived(Ljava/util/List;)V
    .locals 5

    const-string/jumbo v0, "LoginmainIM"

    const-string/jumbo v1, "onMessageReceived"

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    if-eqz p1, :cond_2

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_2

    const/4 v0, 0x0

    move v1, v0

    :goto_0
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    if-ge v1, v0, :cond_2

    new-instance v3, Landroid/content/Intent;

    const-string/jumbo v0, "com.em.receiver.newmessage"

    invoke-direct {v3, v0}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMMessage;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->getFrom()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_1

    const-string/jumbo v0, ""

    move-object v2, v0

    :goto_1
    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/hyphenate/chat/EMMessage;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->getMsgId()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    if-eqz v4, :cond_0

    const-string/jumbo v0, ""

    :cond_0
    const-string/jumbo v4, "from"

    invoke-virtual {v3, v4, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string/jumbo v2, "msgid"

    invoke-virtual {v3, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    iget-object v0, p0, Lcom/waiqin365/base/login/at;->a:Lcom/waiqin365/base/login/LoginMainActivity;

    const/4 v2, 0x0

    invoke-virtual {v0, v3, v2}, Lcom/waiqin365/base/login/LoginMainActivity;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V

    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_0

    :cond_1
    move-object v2, v0

    goto :goto_1

    :cond_2
    return-void
.end method
